<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button id="btn">获取数据</button>
  <ul id="container"></ul>
  <script>
    btn.addEventListener('click',()=>{
      console.log(Date.now());
      const lis = Array(10000).fill(1)
      console.log(lis,'lis');
      lis.forEach(item =>{
        const li = document.createElement('li')
        li.innerText = Math.floor(Math.random() * 10000)
        container.appendChild(li)
      })
      console.log(Date.now());
    })
  </script>
</body>
</html>